home *** CD-ROM | disk | FTP | other *** search
/ Acorn RISC PD-CD 1 / Acorn RISC PD-CD 1.iso / utilities / _fonttools / fonttools / _deskfonts / docs / readme2 < prev    next >
Encoding:
Text File  |  1992-07-05  |  9.7 KB  |  235 lines

  1.  
  2. About DeskFonts
  3. ---------------
  4.  
  5. Deskfonts is a utility which replaces the default system font with an outline
  6. font of your choice in the desktop and wherever else VDU5 type text is used.
  7.  
  8. Technical details about how Deskfonts works and some of the un-avoidable
  9. problems involved are given at the end of this document. What follows is a
  10. description of the DeskFonts multi-tasking frontend which is all that most
  11. people will see.
  12.  
  13. Load !DeskFonts in the usual way, by double clicking on it's icon. The
  14. program will install on the icon bar and clicking on this icon opens the
  15. main window. From top down, the functions which are then available are as
  16. follows:
  17.  
  18. Click on the option switch at the extreme top-left to toggle between the
  19. normal system font and the anti-aliased font. When this switch is on, the
  20. anti-aliased font will be used. Choose a anti-aliased font from the menu of
  21. available fonts. This menu may be opened by clicking on the icon called
  22. 'Fonts...' or by clicking MENU anywhere within the window. When choosing a
  23. font, it is important to note that proportional fonts (which make up the vast
  24. majority of outline fonts available) can cause problems. See below for
  25. details.
  26.  
  27. The Size X and Size Y options allow you to change the size of the text in
  28. (surprise surprise !) the horizontal and vertical directions. Some restraint
  29. is necessary when altering the sizes. To change a size, either use the left
  30. and right arrow icons (1/4 point change or 1 point with SHIFT held down),
  31. or, enter a value into the writable size icon and press RETURN.
  32.  
  33. In Corpus, the maximum sizes that can reasonably be used are - XSize 10.75,
  34. Ysize 16.5
  35.  
  36. The Offset X size should normally be zero. Small values (eg 1 or 2) can be
  37. useful sometimes, but larger values almost always cause a mess. The value
  38. is os-units extra before each string.
  39.  
  40. The Offset Y size should normally be about 24. You may have to alter this if
  41. using a unusual text size, either increasing or decreasing it for larger and
  42. smaller y text sizes.
  43.  
  44. The colour checking radio options. These control the amount of
  45. 'intelligence' the program displays when printing text.
  46.  
  47. 'None' results in black text anti-aliasing to white everywhere. Shaded menu
  48. items have never been so hard to spot!
  49.  
  50. 'Partial' changes the text foreground to the colour the normal system font
  51. would be printed in at the same place but leaves the anti-aliasing at white.
  52. Can look strange in title bars etc.
  53.  
  54. 'Complete' tries to guess the colour the text will be anti-aliased to. The
  55. method used is slightly suspect (see the technical section for details).
  56.  
  57. The operating system radio options are necessary because RISC-OS 2 uses some
  58. redefinable system characters for the tool icons around window borders
  59. (close icon etc.). Since the corrosponding characters are not present in an
  60. outline font, running Deskfonts on a risc-os 2 machine was slightly strange,
  61. as these icons immediately disappeared! See the technical notes for details of
  62. other problems that these missing characters cause and a possible solution.
  63.  
  64. The Settings box allows you to save, re-load and reset all of the above
  65. settings. Saved settings are automatically re-loaded with the program so you
  66. can 'tune' deskfonts to suit your preference and then save these settings.
  67.  
  68. The Reset box (made large deliberately) is used in a 'panic' situation. Eg.
  69. you've chosen a font width of 0.001 points and you can't read anything! It
  70. resets all of the values to defaults and also resets the display to the
  71. system font.
  72.  
  73. The Icon bar menu
  74. -----------------
  75.  
  76. Fairly standard except that 'Quit' has a sub-menu. Choosing 'Quit>Complete'
  77. or just 'Quit' removes DeskFonts entirely and resets to the system font.
  78. Choosing 'Quit>Partial' leaves the DeskFonts module active, displaying the
  79. last settings you chose.
  80.  
  81.  
  82. Technical notes
  83. ---------------
  84.  
  85. Problems
  86. --------
  87.  
  88. Proportionally spaced fonts cause problems when used in place of the system
  89. font. In particular -
  90.  
  91. Text which is normally centred (eg in an icon) almost never is. The caret
  92. does not appear in the correct place within writable icons. Text which
  93. contains a great number of wide characters (eg uppercase W in most fonts)
  94. can overlap the edges of the icon it's supposed to be within.
  95.  
  96. The colour of the text can sometimes be a little strange in 256-colour
  97. modes. This is because of several problems with Risc-Os (specifically - SWI
  98. OS_ReadPalette doesn't seem to work correctly - or I don't understand it!).
  99.  
  100. There is a known problem with the window manager call which produces the
  101. standard 'Wimp-Report' error box. Sometimes, for no apparent reason the text
  102. is printed in vdu 4 mode at the top of the screen rather than in the error
  103. window. To follow Acorn guidelines correctly, DeskFonts should remove itself
  104. (ie restore the system font) before an error window opens and relink after
  105. the window closes. However this would make all of the text in such a window
  106. appear in the system font. As many programmers (myself included) use
  107. Wimp_ReportError for message dialogs and queries, this would make DeskFonts
  108. substantially useless. I will continue to work on this problem and may
  109. produce an update in the future.
  110.  
  111. UPDATE: Option added to allow Error trapping. When on, the default system
  112. font is used within Wimp_Error dialogs, outline font restored afterwards.
  113.  
  114. Text display is (naturally) quite a lot slower than with the normal system
  115. font.
  116.  
  117. Those programs which use the up arrow symbol in menus to denote the use
  118. of the SHIFT key will either -
  119.  
  120. Not display the arrow symbol (risc-os3 setting)
  121. or, Display the arrow over the top of the first character in the menu item -
  122. making a nasty mess! (risc-os2 setting)
  123. One solution would be to define the necessary characters in a font (with
  124. !FontEd) to be anti-aliased versions of the system font equivilant. This
  125. would allow (on Risc-os 3 setting) the correct characters to be displayed.
  126. The characters that would need to be defined are -
  127.  
  128. &80 tick
  129. &81 (from large to small icon)
  130. &82 (from small to large icon)
  131. &83 re-size window icon
  132. &84 close window icon (x)
  133. &85 move to back icon
  134. &88 right arrow
  135. &89 left arrow
  136. &8A down arrow
  137. &8B up arrow (this is the only one needed for RISC-OS 3 users)
  138.  
  139. I have roughly defined a variant on Corpus.Bold to include these characters.
  140. The font is called CorpusD and is included. Note that these definitions are
  141. VERY crude. Someone else is sure to do something better. If they do then how
  142. about sending me a copy? Also, if you are good at that sort of thing, how
  143. about defining a new monospaced outline font for the desktop that looks
  144. better than Corpus? I've got the MDA fonts that come with the PC emulator
  145. and they look even worse than Corpus.
  146.  
  147. How DeskFonts works
  148. -------------------
  149.  
  150. The low level Relocatable module intercepts all calls to the operating
  151. systems' Write character routine and re-directs the character to be printed
  152. to the fontmanager. This is complicated by the fact that many calls to
  153. OS_WriteC are NOT printable characters but moves, draws, colour changes etc.
  154. The inital code can often seem to be followed by a normal ASCII character
  155. but it MUST NOT be caught. The program gets round this by counting a
  156. specific number of characters through after the reciept of such a VDU code.
  157.  
  158. It also has to check for two special cases even when it thinks that it's
  159. recieved a normal character.
  160.  
  161. The first is when the computer is in VDU4 mode (ie when the user's pressed
  162. f12). Such characters must be passed along to the standard OS_WriteC
  163.  
  164. The second is to check that VDU output has not been re-directed via a
  165. mechinism known as VDUX_V which is used by the WindowManager to provide
  166. anti-aliased text in an icon in the desktop.
  167.  
  168. Characters which are to be printed are stored in a buffer until a control
  169. character is found. At this point the current graphics cursor position is
  170. found and the string printed.
  171.  
  172. The program has to determine the colour of the text according to the Colour
  173. checking rules defined and set the anti-aliased palette.
  174.  
  175. The program also has to check for and respond to Service calls to do with
  176. mode changes, so that the font can be recomputed correctly.
  177.                                
  178.  
  179. Star commands
  180. -------------
  181.  
  182. All of the features of DeskFonts are provided by the DeskFonts relocatable
  183. module. This module interfaces to the desktop via a number of star commands.
  184. Short notes on these are given below. Similar help can be provided by
  185. pressing f12 after DeskFonts has loaded and typing *Help DeskFonts
  186.  
  187.  
  188. ==> Help on keyword DeskFonts
  189. Module is: Desk fonts      1.05 (25 Feb 1992) © Rob Davison 1992
  190.  
  191. Commands provided:
  192. DFontON DFontOFF        DFont   DFontX  DFontY  DfontOffset     DfontAlias     
  193. DFontAddx DfontOS DfontReset
  194.  
  195.  
  196. ==> Help on keyword DFontON
  197. *DFontON intercepts future calls to OS_WriteC and prints subsequent text in
  198. an anti-aliased font. Syntax: *DfontON
  199.  
  200. ==> Help on keyword DFontOFF
  201. *DFontOFF restores the default system font.
  202. Syntax: *DfontOFF
  203.  
  204. ==> Help on keyword DFont
  205. *DFont sets the font to be used in the desktop after a *DFontON.
  206. Syntax: *DFont <FontName>
  207.  
  208. ==> Help on keyword DFontX
  209. *DFontX sets the width of anti-aliased text in the desktop.
  210. Syntax: *DFontX <pointsize*16>
  211.  
  212. ==> Help on keyword DFontY
  213. *DFontY sets the height of anti-aliased text in the desktop.
  214. Syntax: *DFontY <pointsize*16>
  215.  
  216. ==> Help on keyword DfontOffset
  217. *DFontOffset sets the vertical offset of the anti-aliased text from the
  218. normal text position. Syntax: *DFontOffset <os-units>
  219.  
  220. ==> Help on keyword DfontAlias
  221. *DfontAlias controls DeskFonts colour checking.
  222. Syntax: *DFontAlias 0|1|2
  223.  
  224. ==> Help on keyword DFontAddx
  225. *DfontAddx sets the horizontal pixel offset between each character.
  226. Syntax: *DfontAddx <os-units>
  227.  
  228. ==> Help on keyword DfontOS
  229. *DFontOS allows DeskFonts to cater for different versions of RISC-OS.
  230. Syntax: *DFontOS 2|3
  231.  
  232. ==> Help on keyword DfontReset
  233. *DFontReset resets all of DeskFonts internal values to sensible defaults.
  234. Syntax: *DFontReset
  235.